package ch4;

import java.util.Scanner;

public class ZouYe14 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入第一个数:");
        int a = input.nextInt();
        System.out.println("请输入第二个数:");
        int b = input.nextInt();
        System.out.println("请输入第三个数:");
        int c = input.nextInt();
        int d = 0;
        int e = 0;
        int f = 0;
        if (a > b && a > c) {
            d = a;
            if (b > c) {
                e = b;
                f = c;
            } else {
                e = c;
                f = b;
            }
        } else if (b > c && b > a) {
            d = b;
            if (a > c) {
                e = a;
                f = c;
            } else if (c > a) {
                e = c;
                f = a;
            }
        } else if (c > a && c > b) {
            d = c;
            if (a > b) {
                e = a;
                f = b;
            } else {
                e = b;
                f = a;
            }
        }
        System.out.println(f);
        System.out.println(e);
        System.out.println(d);
    }
}



